(when (>= (javaVersion T) (1 7) )
  (if (>= (javaVersion T) (1 8) )
    (de methodHandleAsFunctionalInterface (MethodHandle Class . @)
      (let (Captures (rest)
            MethodType (java MethodHandle "type") )
        (or
          (catch+ '("IllegalArgumentException")
            (thread "java.lang.invoke.LambdaMetafactory"
              (java "metafactory"
                (lookup)
                (functionalMethodName Class)
                (apply methodType
                  (make
                    (link Class)
                    (for (I . C) Captures
                      (thread MethodType
                        (java "parameterType"
                          (dec I) )
                        link) ) ) )
                (functionalMethodType Class)
                MethodHandle
                (java MethodType "dropParameterTypes" 0
                  (length Captures) ) )
              (java "dynamicInvoker")
              ('((MH)
                (apply invokeMethodHandle
                  (insert 1 Captures MH) ) ) ) ) )
          (java "java.lang.invoke.MethodHandleProxies"
            "asInterfaceInstance" Class MethodHandle) ) ) )
    (de methodHandleAsFunctionalInterface (MethodHandle Class)
      (java "java.lang.invoke.MethodHandleProxies"
        "asInterfaceInstance" Class MethodHandle) ) ) )